{include file='common/head'}
<div style="overflow-x: hidden;width: 96%;margin: auto;padding-top: 1rem;height: 750px">


    <div class="layui-form" action="" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label"><span style="color: red">*</span>用户名</label>
            <div class="layui-input-block">
                <input type="hidden" name="id" value="{$info.id|default=''}">
                <input type="hidden" name="user_id" value="{$info.user_id|default=''}">
                <input type="text" name="user_name" value="{$info.user_name|default=''}"  lay-verify="title" disabled autocomplete="off" placeholder="" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span style="color: red">*</span>手机号</label>
            <div class="layui-input-block">
                <input type="text" name="mobile" value="{$info.mobile|default=''}"  lay-verify="title" autocomplete="off" disabled placeholder="" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span style="color: red">*</span>身份证号</label>
            <div class="layui-input-block">
                <input type="text" name="idcard" value="{$info.idcard|default=''}"  lay-verify="title" autocomplete="off" disabled placeholder="" class="layui-input">
            </div>
        </div><div class="layui-form-item">
        <label class="layui-form-label"><span style="color: red">*</span>用户地址</label>
        <div class="layui-input-block">
            <input type="text" name="address" value="{$info.new_address|default=''}"  lay-verify="title" autocomplete="off" disabled placeholder="" class="layui-input">
        </div>
    </div>
        <div class="layui-form-item">
            <label class="layui-form-label">身份证照</label>
            <div class="layui-input-inline">
                <img src="{$info.id_img|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">营业执照</label>
            <div class="layui-input-inline">
                <div><img src="{$info.business_license_img|default=''}" class="img"></div>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">审核状态</label>
            <div class="layui-input-block">
                <input type="radio" name="status" value="3" title="通过" checked>
                <input type="radio" name="status" value="2" title="拒绝">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="demo1">审核</button>
            </div>
        </div>
    </div>


</div>
{include file='common/footer'}


<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });

        //创建一个编辑器
        var editIndex = layedit.build('demo');

        //自定义验证规则
        form.verify({
            pass: [/(.+){6,12}$/, '密码必须6到12位']
            ,content: function(value){
                layedit.sync(editIndex);
            }
        });

        //监听指定开关
        form.on('switch(switchTest)', function(data){
            layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
                offset: '6px'
            });
            layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
        });



        //监听提交
        form.on('submit(demo1)', function(data){
            $.ajax({
                url: '{:url("Check/checkManufacturer")}',
                type: 'post',
                dataType: 'json',
                data: data.field,
                success: function (obj) {
                    if(obj.code==200){
                        parent.layer.msg(obj.msg);
                        //当你在iframe页面关闭自身时
                        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                        parent.layer.close(index,data.field); //再执行关闭
                    }
                    if(obj.code==400){
                        layer.msg(obj.msg, {icon: 5,time: 1000});
                    }
                },
                error:function(data){
                    console.log(data);
                }
            });

        });


    });
</script>

</body>
</html>